package com.zhongxi.guoyuan.entity.shopcart;

import org.json.JSONObject;

/**
 * Created by Administrator on 2017/2/18.
 */

public class GoodsInfo {
    private String id;
    private String cateid;
    private String name;
    private String thumbnail;
    private String subject;
    private String price;
    private String marketprice;
    private String getermethod;
    private String postage;
    private String ctime;
    private String status;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCateid() {
        return cateid;
    }

    public void setCateid(String cateid) {
        this.cateid = cateid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getMarketprice() {
        return marketprice;
    }

    public void setMarketprice(String marketprice) {
        this.marketprice = marketprice;
    }

    public String getGetermethod() {
        return getermethod;
    }

    public void setGetermethod(String getermethod) {
        this.getermethod = getermethod;
    }

    public String getPostage() {
        return postage;
    }

    public void setPostage(String postage) {
        this.postage = postage;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public static GoodsInfo parseMatch(JSONObject obj) {
        GoodsInfo info = new GoodsInfo();
        try{
            info.setId(obj.getString("id"));
            info.setCateid(obj.getString("cateid"));
            info.setName(obj.getString("name"));
            info.setThumbnail(obj.getString("thumbnail"));
            info.setSubject(obj.getString("subject"));
            info.setPrice(obj.getString("price"));
            info.setMarketprice(obj.getString("getermethod"));
            info.setGetermethod(obj.getString("getermethod"));
            info.setPostage(obj.getString("postage"));
            info.setCtime(obj.getString("ctime"));
            info.setStatus(obj.getString("status"));
        }catch (Exception e){
            e.printStackTrace();
        }
        return info;
    }
}
